//
//  RootViewController.m
//  GoodBuy
//
//  Created by Cyber on 15/5/13.
//  Copyright (c) 2015年 GoodBuy. All rights reserved.
//

#import "RootViewController.h"

@interface RootViewController ()

@end

@implementation RootViewController


- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    YBChinaListViewController *chinaLVC = [[YBChinaListViewController alloc]init];
    UINavigationController *chinaNC = [[UINavigationController alloc]initWithRootViewController:chinaLVC];
    chinaNC.tabBarItem.title = @"购国内";
    chinaNC.tabBarItem.image = [UIImage imageNamed:@"tabbarChina"];
    
    
    YBForeignListViewController *foreignLVC = [[YBForeignListViewController alloc]init];
    UINavigationController *foreignNC = [[UINavigationController alloc]initWithRootViewController:foreignLVC];
    foreignNC.tabBarItem.title = @"全球买";
    foreignNC.tabBarItem.image = [UIImage imageNamed:@"tabbarForeign"];
    
    YBNineListViewController *nineLVC = [[YBNineListViewController alloc]init];
    UINavigationController *nineNC = [[UINavigationController alloc]initWithRootViewController:nineLVC];
    nineNC.tabBarItem.title = @"九块九";
    nineNC.tabBarItem.image = [UIImage imageNamed:@"tabbarNine"];
    
    YBNewsListViewController *newsLVC = [[YBNewsListViewController alloc]init];
    UINavigationController *newsNC = [[UINavigationController alloc]initWithRootViewController:newsLVC];
    newsNC.tabBarItem.title = @"资讯";
    newsNC.tabBarItem.image = [UIImage imageNamed:@"tabbarNews"];
    
    YBMYListViewController *myLVC = [[YBMYListViewController alloc]init];
    UINavigationController *myNC = [[UINavigationController alloc]initWithRootViewController:myLVC];
    myNC.tabBarItem.title = @"MY";
    myNC.tabBarItem.image = [UIImage imageNamed:@"tabbarMY"];
    
    self.viewControllers = @[chinaNC, foreignNC, nineNC, newsNC, myNC];
    
    
    
    
    
    
}
//-------禁止横屏
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
{
    return (toInterfaceOrientation == UIInterfaceOrientationPortrait);
}
- (BOOL)shouldAutorotate
{
    return NO;
}
- (NSUInteger)supportedInterfaceOrientations
{
    return UIInterfaceOrientationMaskPortrait;//只支持这一个方向(正常的方向)
}
//------禁止横屏结束

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
